﻿/**
 *  if have any question pleas email me wzyuliyang911@gmail.com
 *
 */


#ifndef INITRECT_H
#define INITRECT_H
#include <opencv2/opencv.hpp>
#include <iostream>
using namespace std;
using namespace cv;

namespace MyInitRectNameSpace {

static Point point1, point2; /* vertical points of the bounding box */
static int drag;
static int select_flag;
static Rect rect; /* bounding box */
static Mat img;
static Mat roiImg; /* roiImg - the part of the image in the bounding box */
static String _MatFileName;
static String _windowName;

}

class InitRect
{
public:
    InitRect(String MatFilename,String windowName);
    InitRect(Mat InputMat,String windowName);
    ~InitRect();
    static void mouseHandler(int event, int x, int y, int flags, void *param);
    Rect Select();
};

#endif // INITRECT_H
